Communciation method using polar code, and wireless device

ABSTRACT

Embodiments of the application provide a polar coding method for communicating information in a wireless network. Information bits are encoded using a polar code process to obtain a polar-coded bit sequence. A rate matched bit sequence is output based on the polar-coded bit sequence. The rate matched bit sequence includes a quantity M of bits from the polar-coded bit sequence, and the M bits from the polar-coded bit sequence correspond to M channel indexes in a channel index sequence S. The channel index sequence S is obtained based on a puncturing/shortening proportion P′ and a prestored channel index sequence S′. Channel indexes in the prestored channel index sequence S′ are sorted by channel reliability or channel capacity, and a sorting order of the M channel indexes in the channel index sequence S is the same as a sorting order of the channel indexes in the prestored channel index sequence S′.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No. PCT/CN2018/093030, filed on Jun. 27, 2018. The International Application claims priority to Chinese Patent Application No. 201710503568.9, filed on Jun. 27, 2017. All of the afore-mentioned patent applications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to wireless communication field, especially relates to a channel coding method and device.

BACKGROUND

Communication systems use channel coding to improve reliability of data transmission and ensure communication quality. Polar code is a coding manner that can theoretically achieve Shannon capacity and that has simple encoding and decoding algorithms. A polar code is a type of linear block code. A generator matrix of the polar code is G_(N), and a coding process of the polar code is:

x₁ ^(N)=u₁ ^(N)G_(N)

where x₁ ^(N) is an N-bit ouput sequence of the coding process, u₁ ^(N)=(u₁, u₂, K, u_(N)) is an N-bit binary row vector, N=2^(n) is a mother code length, n is a positive integer, K is a quantity of information bits (K≤N), G_(N) is a N row×N column matrix, G_(N)=F₂ ^(⊗(log) ² ^((N))) is a 2×2 matrix

$F_{2} = {\begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}.\mspace{14mu} F_{2}^{\otimes {({\log_{2}{(N)}})}}}$

is a Kronecker product of F₂, and F^(⊗(log) ² ^((N)))=F⊗F^(⊗((log) ² ^(N))−1))

During a polar coding process, some bits in u₁ ^(N) are used to carry information, and these bits are referred to as information bits. In u₁ ^(N), each bit has a sequence number (or called index). A set of sequence numbers of the information bits is denoted as A. Other bits in u₁ ^(N) are set to a fixed value that is pre-agreed upon between a receive end (receiving device) and a transmit end (transmitting device), and they are referred to as fixed bits. A set of sequence numbers of the fixed bits is represented by a complementary set A^(c) of A. Without loss of generality, the fixed bits are usually set to zero. Actually, as long as the receive end and the transmit end pre-agree with each other, the fixed bits can be set to any value. Therefore, a coded bit sequence, i.e. a polar code, may be obtained by using x₁ ^(N)=u_(A)G_(N)(A), where u_(A) is a set of information bits in u₁ ^(N), and u_(A) is a row vector having a length of K. In other words, |A|=K, where |⋅| indicates a quantity of elements in a set, and K indicates a quantity of elements in the set A. G_(N)(A) is a submatrix of G_(N), and G_(N)(A) is obtained by taking K rows of G_(N) corresponding to K indexes of the information bits in the set A. G_(N)(A) is a matrix of K rows×N columns.

Several polar coding schemes have been developed based on the above basic polar coding process. For example, by using a CRC (Cyclic Redundancy Check)-aided enhanced SC (successive cancellation) decoding algorithm, the polar code may achieve FER (false alarm ratio) performance superior to low density parity check (LDPC) and Turbo codes.

In the prior art, to support all combinations of code lengths and code rates required by a system, a large quantity of mother code sequences need to be stored, and therefore storage overheads of the system can be very large.

SUMMARY

This application provides a coding method, a wireless device, and a chip, so as to decrease storage overheads of a system.

According to a first aspect, this application provides a coding method. The method includes: obtaining input to-be-coded bits; performing polar coding on the to-be-coded bits to obtain a polar-coded bit sequence; obtaining, based on a puncturing/shortening proportion P′ and a prestored sequence S′, a constructed sequence S that has a length equal to a target code length M, where S′ includes N′ channel indexes sorted by channel reliability or channel capacity, and sorting of channel indexes in S is the same as or different from sorting of channel indexes in S′; and mapping the polar-coded bit sequence to a channel corresponding to S.

According to a second aspect, this application provides a wireless device. The wireless device includes at least a memory and an encoder, where

the memory is configured to store a relationship between a puncturing/shortening proportion P′ and a sequence S′; and

the encoder is configured to: obtain an input to-be-coded bit sequence by using an interface; perform polar coding on the to-be-coded bit sequence to obtain a polar-coded bit sequence, and obtain, based on the puncturing/shortening proportion P′ and the sequence S′, a constructed sequence S that has a length equal to a target code length M, where S′ includes N′ channel indexes sorted by channel reliability or channel capacity, and sorting of channel indexes in S is the same as or different from sorting of channel indexes in S′; and map a to-be-transmitted bit sequence to a channel corresponding to S.

According to a third aspect, this application provides a chip, where the chip includes an interface and an encoder, where

the encoder is configured to obtain an input to-be-coded bit sequence by using the interface; and

the encoder is further configured to: perform polar coding on the to-be-coded bit sequence to obtain a polar-coded bit sequence, and obtain, based on a preset puncturing/shortening proportion P′ and a sequence S′, a constructed sequence S that has a length equal to a target code length M, where S′ includes N′ channel indexes sorted by channel reliability or channel capacity, and sorting of channel indexes in S is the same as or different from sorting of channel indexes in S′; and

map the polar-coded bit sequence to a channel corresponding to S.

According to a fourth aspect, this application further provides a computer storage medium, where the storage medium stores program code. When being executed by a computer or a processor, the program code is used to perform the following steps:

obtaining input to-be-coded bits;

performing polar coding on the to-be-coded bits to obtain a polar-coded bit sequence;

obtaining, based on a puncturing/shortening proportion P′ and a prestored sequence S′, a constructed sequence S that has a length equal to a target code length M, where S′ includes N′ channel indexes sorted by channel reliability or channel capacity, and sorting of channel indexes in S is the same as or different from sorting of channel indexes in S′; and

mapping the polar-coded bit sequence to a channel corresponding to S.

According to a fifth aspect, this application further provides a computer program product, where the computer program product includes the foregoing program code, and the computer program product may be stored in the storage medium according to the fourth aspect or may be stored on a server, for download by a user.

According to the technical solutions provided in this application, a constructed sequence that is suitable for various puncturing/shortening proportions may be generated, and channel reliability sorting in the constructed sequence is more appropriate, thereby decreasing a bit error rate.

BRIEF DESCRIPTION OF DRAWINGS

The following briefly describes the accompanying drawings used in describing the embodiments of the present application.

FIG. 1 is a schematic diagram of a wireless communication network in which embodiments of the present application may be implemented;

FIG. 2 is a schematic diagram of a channel encoding and decoding procedure;

FIG. 3 is a flowchart of an encoding method according to an embodiment of the present application;

FIG. 4 is a flowchart of a method for adjusting a sequence according to an embodiment of the present application;

FIG. 5A and FIG. 5B are schematic diagrams of adjusting a sequence, according to an embodiment of the present application;

FIG. 6 is a schematic diagram of adjusting a sequence, according to an embodiment of the present application;

FIG. 7 is a flowchart of performing an adjustment method by a wireless device, according to an embodiment of the present application;

FIG. 8 is a simplified structural diagram of a wireless communication device according to an embodiment of the present application;

FIG. 9A and FIG. 9B are schematic diagrams of extracting a short sequence from a long sequence, according to an embodiment of the present application;

FIG. 10A and FIG. 10B are schematic diagrams of extracting a short sequence from a long sequence, according to an embodiment of the present application; and

FIG. 11A and FIG. 11B are schematic diagrams of coding structures, according to an embodiment of the present application.

DETAILED DESCRIPTION OF EMBODIMENTS

The following describes the technical solutions in the embodiments of the present application with reference to the accompanying drawings.

The technical solution in the embodiments of the present application may be applied in various communications systems. Examples of the communications systems include Global System for Mobile Communications (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, general packet radio service (GPRS) system, Long Term Evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD) system, and Universal Mobile Telecommunications System (UMTS). In addition, the technical solution in the embodiments of the present application may also be applied in various fifth generation (5G) communication systems currently in development, and future communication systems. Generally, systems where information or data is encoded/decoded using a conventional Turbo code or a LDPC code may also use the polar coding method as provided in the embodiments of the present application.

As shown in FIG. 1 for example, a wireless communication network 100 includes a network device 110 and a terminal 112. The network device 110 may be connected to a core network. The network device 110 may communicate with an internet protocol (IP) network 200, such as the Internet, a private IP network, or other data networks. A network device provides a service for a terminal in a coverage area of the network device. For example, as shown in FIG. 1, the network device 110 provides radio access for one or more terminals 112 in a coverage area of the network device 110. In addition, coverage areas of network devices may overlap. For example, coverage area of the network device 110 and coverage ares of another network device 120 may overlap. Network devices may communicate with each other, for example, the network device 110 and the network device 120 may communicate with each other.

A network device may be a device configured to communicate with a terminal device. For example, the network device may be a base transceiver station (BTS) in a GSM system or a CDMA system, a NodeB (NB) in a WCDMA system, an evolved NodeB (eNB or eNodeB) in an LTE system, or a network-side device in a future 5G network. The network device may further be a repeater station, an access point, an in-vehicle device, or the like. In a device-to-device (D2D) communication system, the network device may be a terminal that functions as a base station.

The terminal may be user equipment (UE) device, an access terminal, a subscriber unit, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent, or a user apparatus. The access terminal may be a cellular phone, a cordless telephone set, a Session Initiation Protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device or a computing device having a wireless communication function, a processing device connected to a wireless modem, an in-vehicle device, a wearable device, a terminal device in a future 5G network, or the like.

When the network device communicates with the terminal, the network device/terminal needs to encode to-be-transmitted data/information and decode received data/information according to a procedure shown in FIG. 2. For ease of description, the network device and the terminal are collectively referred to as a wireless device in the following description.

As shown in FIG. 2, after obtaining the to-be-transmitted data/information (which may also be referred to as a source), the wireless device sequentially performs source coding, channel coding, rate matching, and modulation, and sends the processed data/information on a channel as a signal. After receiving the signal, a wireless device at a peer end obtains final data/information (which may also be referred to as a sink) after sequentially performing demodulation, rate de-matching, channel decoding, and source decoding.

The embodiments of the present application pertain to channel coding, which is described in the following by using specific examples. It may be learned, according to the description in the Background section of this application, that in a polar coding process, a mother code length N is obtained, but the mother code length N may not match a target code length M, which equals to a quantity of actually available physical subchannels. Therefore, a rate matching process, which changes an output sequence of N bits to a rate matched sequence of M bits, needs to be performed after the polar coding. Currently, two types of rate matching methods can be used: puncturing and shortening. An objective of the puncturing or shortening is to remove some bits from a to-be-transmitted bit sequence, so that the actually transmitted bit sequence matches carrying capability of the physical channel.

To improve polar code performance, in the polar code, K bit positions are selected from the N-bit binary row vector, to carry information bits (or information bits and CRC bits). The K bit positions, represented by K sequence numbers or channel indexes, correspond to K most reliable subchannels. Optimal decoding performance is ensured because the information bits (or information bits and CRC bits) are transmitted in the most reliable subchannels. Channel indexes in an N-bit mother code sequence are sorted by reliability. If there is no rate matching, the channel indexes corresponding to the K most reliable subchannels may be easily selected from the mother code sequence for carrying the information bits (or information bits and CRC bits). However, after the rate matching, the mother code sequence that has the length of N becomes a constructed sequence that has a length of M. In this case, after M subchannels, represented by M channel indexes in the constructed sequence, are re-sorted by reliability through emulation, it is found that sorting order of the M subchannels in the constructed sequence may change, compared with the original sorting order in the mother code sequence. In this case, it is probably inaccurate if K most reliable subchannels are selected directly based on the reliability sorting order in the mother code sequence.

To resolve the foregoing problem, as shown in FIG. 3, an embodiment of the present application provides the following method, which is performed by a wireless device.

302. Obtain, based on a puncturing/shortening proportion P′ and a prestored sequence S′, a constructed sequence S that has a length equal to a target code length M.

The prestored sequence S′ includes a quantity N′ of channel indexes sorted by channel reliability, and sorting order of channel indexes in the constructed sequence S is the same as or different from sorting order of the channel indexes in the prestored sequence S′.

304. Map to-be-transmitted bits to subchannels corresponding to the constructed sequence S.

If N′=M, the prestored sequence S′ is the same as the constructed sequence S, that is, S=S′, and the sorting order of the channel indexes in S is the same as the sorting order of the channel indexes in S′.

If N′≠M, the foregoing step 302 may be: first obtaining the prestored sequence S′ based on the puncturing/shortening proportion P′, and then obtaining, based on the prestored sequence S′, a sequence that has a length of M (i.e. the constructed sequence).

For example, if N′>M, the constructed sequence S may be obtained, after N′×P′ channels are removed from N′ channels corresponding to the prestored sequence S′, by adjusting channel indexes of remaining N′×(1−P′) subchannels based on a preset adjustment order. The constructed sequence S includes some or all of the channel indexes of the remaining N′×(1−P′) subchannels. How to perform adjustment based on the preset adjustment order will be described later.

If N′<M, the constructed sequence S may be an M-bit sequence that is generated based on the prestored sequence S′. For example, an offset N′ is added to each channel index in S′, to obtain a sequence that has a length of 2N′, or a similar method is used to obtain a sequence S″ that has a length of N″, and N″>M. The constructed sequence S may be obtained, after N″×P′ subchannels are removed from N″ subchannels corresponding to the sequence S″, by adjusting channel indexes of remaining N″×(1−P′) subchannels based on the preset adjustment order, and the constructed sequence S includes some or all of the channel indexes of the remaining N″×(1−P′) subchannels.

A correspondence may exist between the puncturing/shortening proportion P′ and the the prestored sequence S′. For example, before performing step 302, the wireless device may prestore the following Table 1. Table 1 includes correspondences between P′ and S′. There may be n values of P′, namely, P₀′ to P_(n)′. Different values of P′ correspond to different sequences S′, namely, S₀ to S_(n).

The wireless device may obtain a corresponding sequence S′ based on the puncturing/shortening proportion P′ and by querying Table 1. P′ herein indicates an actual puncturing/shortening proportion.

TABLE 1 Value of P′ Sequence S′ P₀′ S₀ P₁′ S₁ P₂′ S₂ . . . . . . P_(n)′ S_(n)

In another example, the foregoing puncturing/shortening proportion P′ may not be an actual puncturing/shortening proportion but an estimated value of a puncturing/shortening proportion, and a plurality of actual puncturing/shortening proportions may correspond to one value of P′. For ease of description, the following uses parameter P to represent the actual puncturing/shortening proportion. For example, the wireless device may alternatively prestore the following Table 2, and Table 2 includes correspondences between P, P′, and S′. Values of P have n+1 ranges (referring to column 1 in Table 2, some ranges may be specific values, which, for ease of description, are collectively referred to as ranges). There may be n+1 values of the corresponding P′, namely, P₀′ to P_(n)′, and different values correspond to different sequences S′, namely, S₀ to S_(n). The wireless device may obtain a corresponding sequence S′ based on the puncturing/shortening proportion P and by querying Table 2.

TABLE 2 Value of P in ranges Value of P′ Sequence S′ P₀ P₀′ S₀ P₀ < P ≤ P₁ P₁′ S₁ P₁ < P ≤ P₂ P₂′ S₂ . . . . . . . . . P_(n−1) < P ≤ P_(n) P_(n)′ S_(n)

Certainly, during actual application, simple variations may be made to the foregoing Table 2, for example, the wireless device may store the following Table 3. The value of P′ in Table 3 is not an estimated value, but represents a value or a value range of an actual puncturing/shortening proportion.

TABLE 3 Value of P′ Sequence S′ P′ = P₀ S₀ P₀ < P′ ≤ P₁ S₁ P₁ < P′ ≤ P₂ S₂ . . . . . . P_(n−1) < P′ ≤ P_(n) S_(n)

The following provides specific examples for ease of understanding.

For example, for a rate matching manner of puncturing, the following Table 4 may be stored. P′ in Table 4 represents a puncturing proportion. Various constructed sequences that have a length of M (M has different values) may be constructed by using four sequences S′ in Table 4.

TABLE 4 Value of P′ Sequence S′ 0 ≤ P′ < ¼ S₀ ¼ ≤ P′ < ⅜ S_(p1) ⅜ ≤ P′ < 7/16 S_(p2) 7/16 ≤ P′ < ½ S₀

For another example, for a rate matching manner of shortening, the following Table 5 may be stored. P′ in Table 5 represents an actual puncturing/shortening proportion. Various constructed sequences that have a length of M (M has different values) may be constructed by using three sequences S′ in Table 5.

TABLE 5 Value of P′ Sequence S′ 0 ≤ P′ < ½ S₀ ½ ≤ P′ < ⅝ S_(s1) ⅝ ≤ P′ < ½ S₀

The sequence S₀ in the foregoing table may be a basic sequence. To reduce storage overheads, the wireless device may not need to store a plurality of sequences S′. For example, only the sequence S₀ is stored, and other sequences may be generated based on the sequence S₀. For example, S₀ may be a largest mother code sequence, and other sequences such as S_(p1), S_(p2), or S_(s1) may be extracted from S₀ according to a particular order. S₀ may alternatively be a short sequence, other sequences may be generated based on S₀, and there are a plurality of generation manners. For example, S₀ and a short sequence are combined to generate another sequence, or after an offset is added to each channel index in S₀, a sequence is constructed by combining the S₀ and the offset-added channel indexes. Constructing a sequence is not a focus of the present application, and therefore details are not described further herein.

If the length of the prestored sequence S′ is exactly M, rate matching is not needed. Channels used for transmitting K information bits may be selected directly based on S′.

If the length of the prestored sequence S′ is not equal to M, rate matching is related. For example, if the length of S′ is greater than M, a constructed sequence S that has a length of M may be obtained by using a method shown in FIG. 4.

402. Puncture/shorten N′×P′ channel indexes from N′ channel indexes of S′.

In a specific implementation, the N′×P′ channel indexes may be removed, or N′×P′ subchannels, whose reliability is decreased to 0 because of the puncturing/shortening, are frozen, or reliability sorting orders of the punctured/shortened N′×P′ channel indexes are set to the lowest. For example, channel index values corresponding to N′×P′ subchannels are assigned to Q₁, . . . , Q_(N′×P′), indicating that the N′×P′ subchannels have the lowest reliability. Alternatively, the subchannels whose reliability is decreased to zero due to puncturing/shortening are directly frozen.

Positions of the foregoing punctured/shortened N′×P′ subchannels may be consecutive, as shown in FIG. 5A, block 502 a. An order of puncturing/shortening may be from beginning to end, or from end to beginning, or channel indexes in several consecutive positions in the middle are punctured/shortened. Positions of the punctured/shortened N′×P′ subchannels may alternatively be dispersed, irregularly or regularly. For example, one or more channel indexes are punctured/shortened at an interval of T bits. The positions of the punctured/shortened N′×P′ subchannels may be a result subject to both the foregoing two manners. For example, as shown by 502 b in FIG. 5B, when 0<P≤1/4, a consecutive puncturing/shortening manner is used; or when 1/4<P≤1/2, a dispersed puncturing/shortening manner is used. The puncturing/shortening positions shown in FIG. 5A and FIG. 5B are merely examples. In actual applications, a puncturing/shortening position may be a mirror, in a left or right direction with the middle position as an axis, of the position shown in FIG. 5A and FIG. 5B, or may be another position.

If a puncturing proportion is slightly less than 1/4, that is, N′×3/4<M<β×(N′×3/4), an i (<N′/4) part is forcibly frozen, and a corresponding adjustment short sequence is all all zeros, that is, the 504 a part is not adjusted, where β>1, β=1+1/16, 1+1/8, 1+3/16, . . . , or β is a function of K₀/M₀ or K₀/N₀. In this case, a quantity of indexes shown by 502 a plus a quantity of indexes shown by 504 a in FIG. 5A may be less than or equal to N′/4.

An object of the foregoing puncturing/shortening may be a sequence obtained based on natural sorting by channel index, for example, {1, 2, 3, 4, . . . , 512} and {1, 2, 3, 4, . . . , 1024}, or may be a sequence after channel indexes are sorted by channel reliability. This is not limited herein.

404. Adjust positions of to-be-adjusted L channel indexes based on an adjustment sequence.

The to-be-adjusted L channel indexes may be consecutive, as shown by 504 a in FIG. 5A, or the to-be-adjusted L channel indexes may be dispersed, as shown by 504 b in FIG. 5B. The to-be-adjusted L channel indexes may alternatively be partially consecutive and partially dispersed.

Assuming that the L channel indexes are {X₁, X₂, . . . , X_(L−1), X_(L)}, and an adjustment sequence corresponding to the L channel indexes is {a₁, a₂, . . . , a_(L−1), a_(L)}, the positions of the to-be-adjusted L channel indexes are adjusted based on the adjustment sequence, which indicates that, a position of an index X₁ needs to be moved a₁ positions backward or forward (for example, that a₁ is a positive number indicates moving backward; that a₁ is a negative number indicates moving forward), a position of an index X₂ needs to be moved a₂ positions backward or forward, a position of an index X_(L−1) needs to be moved a_(L−1) positions backward or forward, and a position of an index X_(L) needs to be moved at positions backward or forward.

406. Extract N×(1−P′)−L indexes from S′.

If S′ is a Q sequence, the N′×(1−P′)−L channel indexes may be sequentially extracted from the Q sequence. As shown in FIG. 5A, it is assumed that the length of S′ is 512, and channel indexes whose values are 129 to 512 need to be filled in the 506 a part. In this case, only channel indexes whose index values are 129 to 512 need to be sequentially extracted from the Q sequence that has the length of 512. Sorting order of 129 to 512 channel indexes is consistent with sorting order in the Q sequence (sorting consistency herein means that a relative order of channel indexes is consistent).

Alternatively, as shown in FIG. 5B, it is assumed that the length of S′ is still 512, and channel indexes whose values are 192 to 256 and 320 to 512 need to be filled in the 506 b part. In this case, only channel indexes whose index values are 192 to 256 and 320 to 512 need to be sequentially extracted from the Q sequence that has the length of 512. Sorting order of 192 to 256 and 320 to 512 channel indexes is consistent with sorting order in the Q sequence (sorting consistency herein means that a relative order of channel indexes is consistent).

For example, if the sequence S′ is a sequence {0,1,2,4,3,5,6,7} that has a length of 8, and if N×(1−P′)−L=4, N′×(1−P′)−L channel indexes, which are {0,1,2,3}, may be extracted, as shown in FIG. 9A.

For another example, if the sequence S′ is a sequence {0,1,2,4,3,5,6,7} that has a length of 8 and is expressed in binary, as shown by row 1 in FIG. 9B, and if N×(1−P′)−L=4, a manner shown in FIG. 9B may be used to extract a binary index that has a bit equal to a fixed value (for example, a first bit is equal to 1) in each binary index in S′. Specifically, as shown by row 2 in FIG. 9B, the first bit is removed, and an extracted channel index set {00,01,10,11} is formed.

408. Sequentially insert the N′×(1−P′)−L indexes into the foregoing L indexes whose positions are adjusted, to obtain a sequence S_(A).

If S′ is a Q sequence, the adjustment sequence is ΔQ_(i), and ΔQ_(i) includes a position offset of an index in a to-be-adjusted sequence, a wireless device may adjust positions of some of to-be-adjusted indexes based on ΔQ_(i). For example, the to-be-adjusted indexes are adjusted to corresponding positions based on the position offset included in ΔQ_(i), and then the N′×(1−P′)−L indexes are sequentially placed on positions on which the L indexes are not placed, for example, the positions shown by 506 a in FIG. 5A or 506 b in FIG. 5B.

If S′ is a Z sequence, the adjustment sequence is ΔZ_(i), and ΔZ_(i) includes reliability values of indexes in a to-be-adjusted sequence, the wireless device may adjust the reliability values included in ΔZ_(i) to corresponding positions, for example, the reliability values included in ΔZ_(i) and reliability values of the foregoing N′×(1−P′)−L channels may be re-sorted.

410. Obtain, based on the sequence S_(A) formed in step 408, a constructed sequence S that has a length of M.

Assuming that a length of S_(A) is M′=N′×(1−P′), if M′=M, step 410 is not needed, that is, the sequence formed in step 408 is a final sequence S.

If a length M′ of S_(A) is greater than M, the constructed sequence S that has the length of M needs to be further extracted from S_(A). There are a plurality of manners of extracting the constructed sequence S that has a length of M from S_(A).

Manner (1): If S_(A) is a Q sequence, a set of indexes that are extracted from S_(A) and meet the following condition forms the foregoing constructed sequence S:

mod(Q _(i) ,M′/M)=C,

where Q_(i) is an i^(th) index in S_(A), 1≤i≤M′, C is an integer, and 0≤C<M′/M.

For example, if S_(A) is a sequence {0,1,2,4,3,5,6,7} that has a length of 8, and M=4, a manner shown in FIG. 10A may be used to form the final constructed sequence S, namely, {0,1,2,3}.

Manner (2): If S_(A) is a Q sequence, and M′/M=2^(X), the constructed sequence S is formed after indexes in S_(A) are expressed in binary, and X bits and repeated binary index numbers are removed from S_(A).

For example, if S_(A) is a sequence {0,1,2,4,3,5,6,7} that has a length of 8 and is expressed in binary, as shown by row 1 in FIG. 10B, and if M=4, a manner shown in FIG. 10B may be used to remove a last bit from each binary index in S_(A) to form the final constructed sequence S, that is, {00,01,10,11}={0,1,2,3}.

Manner (3): If S_(A) is a Z sequence sorted by reliability, indexes may be extracted with a same spacing from the Z sequence to form the constructed sequence S. For example, assuming that the Z sequence is {Z₁, Z₂, . . . , Z_(M′)}, {Z₁, Z₃, Z₅, . . . } may be extracted from the Z sequence to form the constructed sequence S. This example is given merely for ease of understanding. In a specific implementation, a spacing needs to be set based on a value of M or a relationship between M and M′.

Manner (4): If S_(A) is a Z sequence sorted by reliability, indexes may be extracted with a fixed spacing from the Z sequence to form the constructed sequence S.

For ease of understanding, the following gives specific examples for description.

As shown in FIG. 6, assuming that the length of S′ is 16, as shown in FIG. 6, if the puncturing/shortening proportion P′=1/4, it means that four indexes need to be removed from S′. It is assumed that indexes that need to be removed are {1,2,3,4} that is shown by 602 in FIG. 6, indexes that need to be adjusted are {5,6,7,8} that is shown by 604 in FIG. 6, and the adjustment sequence is {0,1,1,4}. The adjustment sequence may be understood as offsets (the offset may be a positive integer, 0, or a negative integer) of four indexes that need to be adjusted. As shown in FIG. 6, an index 5 corresponds to an adjustment offset 0, which indicates that a position of the index 5 does not need to be adjusted. An index 6 corresponds to an adjustment offset 1, which indicates that a position of the index 6 needs to be moved 1 bit backward. An index 7 corresponds to an adjustment offset 1, which indicates that a position of the index 7 needs to be moved 1 bit backward. An index 8 corresponds to an adjustment offset 4, which indicates that a position of the index 8 needs to be moved 4 bits backward. After the moving, a position of {5,6,7,8} is shown by 606 in FIG. 6.

When the wireless device already stores a correspondence in any one of the foregoing Table 1 to Table 5, after receiving to-be-transmitted bits, the wireless device adjusts the sequence S based on rate matching, to form the final constructed sequence S. The following describes a procedure of the wireless device. For details, refer to FIG. 7.

702. After receiving to-be-transmitted bits, the wireless device determines whether to perform rate matching. If the rate matching is not required, for example, puncturing or shortening is not required, go to step 708. If the rate matching is required, the wireless device further determines a rate matching manner. If a puncturing manner is used, go to step 704; if a shortening manner is used, go to step 706.

704. Determine a value of a puncturing proportion P′.

706. Determine a value of a shortening proportion P′. (For ease of description, both the shortening proportion and the puncturing proportion are represented by P′. In actual applications, however, the two values may be different, and correspondences between P′ and S′ may be different.)

If the wireless device stores a correspondence between P′ and S′ by using a form shown in Table 2 or 3, in step 704 or 706, the wireless device may further determine a range to which P′ belongs.

708. Obtain a corresponding sequence S′ based on the value of P′.

The wireless device already stores the correspondence between P′ and S′, for example, as shown in any one of Table 1 to Table 5, and the wireless device may find, by querying the table, the sequence S′ corresponding to P′.

710. The wireless device obtains, based on the sequence S′, a constructed sequence S that has a length of M.

How to obtain, based on the sequence S′, the constructed sequence S that has the length of M is described above. For details, refer to corresponding parts in FIG. 5 or FIG. 6. Details are not described herein again.

712. The wireless device maps the to-be-transmitted bit sequence to subchannels corresponding to the constructed sequence S.

The embodiments of the present application further provide a method for extracting a short sequence from a long sequence. This method may be applied to extracting a constructed sequence S that has a length of M from a sequence S′. The length of the long sequence may be an integral power of 2 or may not be an integral power of 2.

For non-mother code sequences, i.e. target sequences, code length M₁ of a first sequence and code length M₂ of a second sequence satisfy M₂=(2^(n))×M₁. For example, a code length M_(i) of a 5G NR (new radio) PDCCH (Physical Downlink Control Channel) may be a fixed value of 96, 192, 384, or 768. A target sequence that has a largest code length and that meets a nested feature may also be constructed, and an extracting manner is similar to the extracting manner (namely, manner (1) in step 410) of the largest mother code sequence. For non-mother code sequences, puncturing or shortening positions for different code lengths need to meet symmetry shown in FIG. 11A or 11B.

According to symmetry of a coding structure shown in FIG. 11A,

A rated matched sequence of M₁=96 is obtained by puncturing or shortening an output sequence of N₁=128, and a set of puncturing or shortening positions is {P₁, P₂, . . . , P₃₂};

A rated matched sequence of M₂=192 is obtained by puncturing or shortening an output sequence of N₂=256, and a set of puncturing or shortening positions is {P₁, P₂, . . . , P₃₂, P₁₊₁₂₈, P₂₊₁₂₈, . . . , P₃₂₊₁₂₈}; and

A rated matched sequence of M₃=384 is obtained by puncturing or shortening an output sequence of N₃=512, and a set puncturing or shortening positions is {P₁, P₂, . . . , P₃₂, P₁₊₁₂₈, P₂₊₁₂₈, . . . , P₃₂₊₁₂₈, P₁₊₂₅₆, P₂₊₂₅₆, . . . , P₃₂₊₂₅₆, P¹⁻³⁸⁴, P₂₊₃₈₄, . . . , P₃₂₊₃₈₄}.

According to symmetry of a coding structure shown in FIG. 11B,

A rated matched sequence of M₁=96 is obtained by puncturing or shortening an output sequence of N₁=128, and a set of puncturing or shortening positions is {P₁, P₂, . . . , P₃₂};

A rated matched sequence of M₂=192 is obtained by puncturing or shortening an output sequence of N₂=256, and a set of puncturing or shortening positions is {P₁, P₂, . . . , P₃₂, P₁₊₁, P₂₊₁, . . . , P₃₂₊₁}; and

A rated matched sequence of M₃=384 is obtained by puncturing or shortening a mother code sequence of N₃=512, and a set of puncturing or shortening positions is {P₁, P₂, . . . , P₃₂, P₁₊₁, P₂₊₁, . . . , P₃₂₊₁, P₁₊₂, P₂₊₂, . . . , P₃₂₊₂, P₁₊₃, P₂₊₃, . . . , P₃₂₊₃}.

FIG. 8 is a schematic block diagram of a wireless device according to an embodiment of the present application. As shown in FIG. 8, a wireless device 800 includes at least an encoder 804 and a memory 808.

The memory 808 is configured to store a correspondence between a puncturing/shortening proportion P′ and a sequence S′.

The encoder 804 is configured to: obtain, based on the correspondence, stored in the memory, between the puncturing/shortening proportion P′ and the sequence S′, a constructed sequence S that has a length equal to a target code length M, where S′ includes N′ channel indexes sorted by channel reliability or channel capacity, and sorting of channel indexes in S is the same as or different from sorting of channel indexes in S′; and map a to-be-transmitted bit sequence to a channel corresponding to S.

Functions of the encoder 804 may be implemented by using a chip or an integrated circuit. If the functions of the encoder 804 are implemented by using a chip, the wireless device 800 may further include an interface 802. The encoder 804 is configured to obtain a to-be-transmitted bit sequence by using the interface 802, and the encoder 804 performs polar coding on the to-be-transmitted bit sequence to obtain an output bit sequence. The encoder may perform some or all of steps 302 to 304, or some or all of steps 402 to 410, or steps 702 to 712.

When performing steps 302 to 304, 402 to 410, or 702 to 712, the chip may be implemented by using a logic circuit or by using a processor, or implemented partially by using a logic circuit and partially by using a processor. If steps 302 to 304, 402 to 410, or 702 to 712 are implemented by using a processor, the memory 808 may store program code that is used to implement some or all of steps 302 to 304, 402 to 410, or 702 to 712. When executing the program code, the processor performs some or all of steps 302 to 304, 402 to 410, or 702 to 712. The memory 808 may be integrated inside a chip or may be disposed outside a chip.

For details about how to obtain a constructed sequence S from a sequence that has a length of S′, refer to the foregoing description. Details are not described herein again.

The wireless device 800 may further include a transmitter 806, configured to send the bit sequence that is mapped by the encoder 804 to the channel corresponding to S.

The wireless device 800 may further include an antenna 816. The transmitter 806 is configured to send, by using the antenna 816, a bit sequence that is output by the encoder. If the wireless device is a terminal, the antenna 816 is probably integrated in the terminal. If the wireless device is a network device, the antenna 816 may be integrated in the network device, or may be separate from the network device, for example, the antenna 816 is connected to the network device in a remote manner.

In addition, the wireless device may further include a receiver 810, configured to receive information or data from another wireless device. A decoder 812 is configured to: obtain, based on the puncturing/shortening proportion P′ and a prestored sequence S′, the constructed sequence S that has the length equal to the target code length M, use the constructed sequence to decode the to-be-decoded bits, and then output decoded bits by using an interface 814. A method for obtaining, by the decoder, S based on S′ is the same as that used on an encoder side. For details, refer to the description in the foregoing method embodiments. Details are not described herein again.

In actual applications, the encoder 804 and the decoder 812 may be integrated together to form a codec or a codec apparatus, and the transmitter 806 and the receiver 810 may be integrated together to form a transceiver.

An embodiment of the present application further provides a chip. The chip includes at least the foregoing interface 802 and the encoder 804.

An embodiment of the present application further provides a computer storage medium. The storage medium stores program code that is used to implement steps 302 to 304, 402 to 410, or 702 to 712.

According to the foregoing technical solutions provided in this application, a constructed sequence that is suitable for various puncturing/shortening proportions may be generated, and channel reliability sorting in the constructed sequence is more appropriate, thereby decreasing a bit error rate.

An embodiment of the present application further provides an encoder, configured to perform the method corresponding to FIG. 11A or FIG. 11B. The encoder may be applied to the wireless device shown in FIG. 8.

The storage medium includes various media that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.

An embodiment of the present application further provides a computer program product. The computer program product includes program code that is used to implement steps 302 to 304, 402 to 410, or 702 to 712. The computer program product may be stored in the storage medium, or on a server, for download by a user.

Connection relationships between components or integral units mentioned in the foregoing embodiments may be direct connections or coupling, or may be indirect connections or coupling. Between two components or integral units, there may be another component or integral unit, which is not particularly related to the solutions of the embodiments of the present application, and therefore is not shown in the figures.

According to the foregoing embodiments, the wireless device or the wireless communication system only needs to store a long sequence, and during coding, reads, from the long sequence, a mother code sequence having a length required for coding, thereby decreasing storage overheads of the wireless device or the system. 

What is claimed is:
 1. A method for communicating information, comprising: obtaining, by a communication device, K information bits, wherein K≥1; polar coding, by the communication device, the information bits, to obtain a polar-coded bit sequence; and outputting, by the communication device, a rate matched bit sequence based on the polar-coded bit sequence; wherein the rate matched bit sequence comprises a quantity M of bits from the polar-coded bit sequence, and the M bits from the polar-coded bit sequence correspond to M channel indexes in a channel index sequence S, wherein M≥K; wherein the channel index sequence S is obtained based on a puncturing/shortening proportion P′ and a prestored channel index sequence S′; wherein the prestored channel index sequence S′ comprises a quantity N′ of channel indexes sorted by channel reliability or channel capacity, and a sorting order of the M channel indexes in the channel index sequence S is the same as a sorting order of the channel indexes in the prestored channel index sequence S′; and wherein N′≥M.
 2. The method according to claim 1, wherein when N′>M, the channel index sequence S comprises N′×(1−P′) channel indexes of the prestored channel index sequence S′.
 3. The method according to claim 1, wherein the quantities N′ and M satisfy: N′×3/4<M<β×(N′×3/4), where β>1, and subchannels corresponding to channel indexes that are less than N′/4 in the prestored channel index sequence S′ are frozen.
 4. The method according to claim 4, wherein β=(1+1/16), β=(1+1/8) or β=(1+3/16).
 5. The method according to claim 1, wherein when N′>M, the channel index sequence S is obtained by: removing N′×P′ channel indexes from the prestored channel index sequence S′; adjusting a sorting order of remaining N′×(1−P′) channel indexes of the prestored channel index sequence S′ based on a preset adjustment sequence; and forming the channel index sequence S that comprises some or all of the remaining N′×(1−P′) channel indexes of the prestored channel index sequence S′ according to the adjusted sorting order.
 6. The method according to claim 1, the puncturing/shortening proportion P′ and the prestored channel index sequence S′ are selected from a plurality of P′ values and a plurality of prestored channel index sequences.
 7. The method according to claim 1, wherein each channel index in the channel index sequence S corresponds to a subchannel for transmitting one bit of the rate-matched bit sequence.
 8. A wireless device, comprising at least a memory and a processor, wherein the memory is configured to store a channel index sequence S′, and the processor is configured to: obtain K information bits, wherein K≥1; polar code the information bits, to obtain a polar-coded bit sequence; and output a rate matched bit sequence based on the polar-coded bit sequence; wherein the rate matched bit sequence comprises a quantity M of bits from the polar-coded bit sequence, and the M bits from the polar-coded bit sequence correspond to M channel indexes in a channel index sequence S, wherein M≥K; wherein the channel index sequence S is obtained based on a puncturing/shortening proportion P′ and the channel index sequence S′; wherein the channel index sequence S′ comprises a quantity N′ of channel indexes sorted by channel reliability or channel capacity, and a sorting order of the M channel indexes in the channel index sequence S is the same as a sorting order of the channel indexes in the channel index sequence S′; and wherein N′≥M.
 9. The wireless device according to claim 8, wherein when N′>M, the channel index sequence S comprises N′×(1−P′) channel indexes of the channel index sequence S′.
 10. The wireless device according to claim 8, wherein the quantities N′ and M satisfy: N′×3/4<M<β×(N′×3/4), where β>1, and the subchannels corresponding to channel indexes that are less than N′/4 in the channel index sequence S′ are frozen.
 11. The wireless device according to claim 10, wherein β=(1+1/16), β=(1+1/8) or β=(1+3/16).
 12. The wireless device according to claim 8, wherein when N′>M, the channel index sequence S is obtained by: removing N′×P′ channel indexes from the channel index sequence S′; adjusting a sorting order of remaining N′×(1−P′) channel indexes the channel index sequence S′ based on a preset adjustment sequence; and forming the channel index sequence S that comprises some or all of the the remaining N′×(1−P′) channel indexes of the channel index sequence S′ according to the adjusted sorting order.
 13. The wireless device according to claim 8, wherein the puncturing/shortening proportion P′ and the channel index sequence S′ are selected from a plurality of P′ values and a plurality of prestored channel index sequences.
 14. The wireless device according to claim 8, wherein each channel index in the channel index sequence S corresponds to a sub channel for transmitting one bit of the rate-matched bit sequence.
 15. A non-transitory storage medium, stroding program codes for execution by a processor of a communication device, wherein when executed, the program codes cause the communication device to: obtain K information bits, wherein K≥1; polar code the information bits, to obtain a polar-coded bit sequence; and output a rate matched bit sequence based on the polar-coded bit sequence; wherein the rate matched bit sequence comprises a quantity M of bits from the polar-coded bit sequence, and the M bits from the polar-coded bit sequence correspond to M channel indexes in a channel index sequence S, wherein M≥K; wherein the channel index sequence S is obtained based on a puncturing/shortening proportion P′ and a prestored channel index sequence S′; wherein the prestored channel index sequence S′ comprises a quality N′ of channel indexes sorted by channel reliability or channel capacity, and a sorting order of the M channel indexes in the channel index sequence S is the same as a sorting order of the channel indexes in the prestored channel index sequence S′; and wherein N′≥M.
 16. The storage medium according to claim 15, wherein when N′>M, the channel index sequence S comprises N′×(1−P′) channel indexes of the prestored channel index sequence S′.
 17. The storage medium according to claim 16, wherein the quantities N′ and M satisfy: N′×3/4<M<β×(N′×3/4), where β>1, and the subchannels corresponding to channel indexes that are less than N′/4 in the prestored channel index sequence S′ are frozen.
 18. The storage medium according to claim 17, wherein β=(1+1/16), β=(1+1/8) or β=(1+3/16).
 19. The storage medium according to claim 15, wherein when N′>M, the channel index sequence S is obtained by: removing N′×P′ channel indexes from the prestored channel index sequence S′; adjusting a sorting order of remaining N′×(1−P′) channel indexes the prestored channel index sequence S′ based on a preset adjustment sequence; and forming the channel index sequence S that comprises some or all of the channel indexes of the remaining N′×(1−P′) channel indexes of the prestored channel index sequence S′ according to the adjusted sorting order.
 20. The storage medium according to claim 15, wherein the puncturing/shortening proportion P′ and the prestored channel index sequence S′ are selected from a plurality of P′ values and a plurality of prestored channel index sequences.
 21. The storage medium according to claim 15, wherein each channel index in the channel index sequence S corresponds to a sub channel for transmitting one bit of the rate-matched bit sequence.
 22. A chip, comprising one or more integrated circuits forming an interface and an encoder, wherein the encoder is configured to: obtain K information bits through the interface, wherein K≥1; perform polar coding on the information bits to obtain a polar-coded bit sequence; and output a rate matched bit sequence based on the polar-coded bit sequence; wherein the rate matched bit sequence comprises a quantity M of bits from the polar-coded bit sequence, and the M bits from the polar-coded bit sequence correspond to M channel indexes in a channel index sequence S, wherein M≥K; wherein the channel index sequence S is obtained based on a puncturing/shortening proportion P′ and a prestored channel index sequence S′; wherein the prestored channel index sequence S′ comprises a quality N′ of channel indexes sorted by channel reliability or channel capacity, and a sorting order of the M channel indexes in the channel index sequence S is the same as a sorting order of the channel indexes in the prestored channel index sequence S′; and wherein N′≥M.
 23. The chip according to claim 22, wherein when N′>M, the channel index sequence S comprises N′×(1−P′) channel indexes of the prestored channel index sequence S′.
 24. The chip according to claim 22, wherein the quantities N′ and M satisfy: N′×3/4<M<β×(N′×3/4), where β>1, and subchannels corresponding to channel indexes that are less than N′/4 in the prestored channel index sequence S′ are frozen.
 25. The chip according to claim 24, wherein β=(1+1/16), β=(1+1/8) or β=(1+3/16).
 26. The chip according to claim 22, wherein when N′>M, the channel index sequence S is obtained by: removing N′×P′ channel indexes from the prestored channel index sequence S′; adjusting a sorting order of remaining N′×(1−P′) channel indexes the prestored channel index sequence S′ based on a preset adjustment sequence; and forming the channel index sequence S that comprises some or all of the channel indexes of the remaining N′×(1−P′) channel indexes of the prestored channel index sequence S′ according to the adjusted sorting order.
 27. The chip according to claim 22, wherein the puncturing/shortening proportion P′ and the prestored channel index sequence S′ are selected from a plurality of P′ values and a plurality of prestored channel index sequences.
 28. The chip according to claim 22, wherein each channel index in the channel index sequence S corresponds to a subchannels for transmitting one bit of the rate-matched bit sequence. 